//获取一个字符串中出现次数最多的字符
var str = "zhufengpeixunyangfanqihang";
var reg = /[a-z]/g;
var obj = {};
for(var i = 0; i < str.length; i++){
    var stri = reg.exec(str);
    
    if(!obj.hasOwnProperty(stri[0])){
        obj[stri[0]] = 1;
    }else{
        obj[stri[0]] += 1;
    }
       
    
    
}

console.log(obj);

var num = 0;

for(var key in obj){
    if(obj[key] > num){
        num = obj[key];
    }
    
}

console.log(num);